﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="Stylesheet" type="text/css" href="CSS/StyleSheet.css" />
    <title>Photos</title>
</head>
<body>
    <table bgcolor="#81acd7" width="100%">
        <tbody>
            <tr>
                <td align="right">SimpleFS | Transactions Framework</td>
            </tr>
        </tbody>
    </table>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td align="right">
                    <asp:Button ID="ButtonAddPhoto" runat="server" Text="Add" Width="120px" 
                        onclick="ButtonAddPhoto_Click" />
                </td>
            </tr>
            <td>
                <tr>
                    <td>
                        <asp:GridView ID="GridViewPhotos" runat="server" DataSourceID="SqlDataSource1" AllowPaging="True"
                            AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                            DataKeyNames="PhotoId" ForeColor="Black" GridLines="Horizontal">
                            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="PhotoId" 
                                    DataNavigateUrlFormatString="Photo.aspx?PhotoId={0}" Text="View" />
                                <asp:BoundField DataField="PhotoId" HeaderText="PhotoId" InsertVisible="False" 
                                    ReadOnly="True" SortExpression="PhotoId" />
                                <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                                <asp:BoundField DataField="Url" HeaderText="Url" SortExpression="Url" />
                            </Columns>
                            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
            </td>
        </table>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PhotoDb %>"
        SelectCommand="SELECT * FROM [Photos]"></asp:SqlDataSource>
    </form>
</body>
</html>
